import requests from "./request";
//登录 post请求
export const reqLogin = (data) => requests({ url: '/api/login', data, method: 'post' })
//获取用户数据
export const reqUserInfo = (data) => requests({ url: '/my/currest', data, method: 'get' })
//获取部门信息
export const reqDeptUserInfo = (page, limit) => requests({ url: `/my/dept/userinfo/${page}/${limit}`, method: 'get' })
//获取使用的部门信息
export const reqUseDept = (page, limit) => requests({ url: `/my/dept/usedept/${page}/${limit}`, method: 'get' })
//获取未使用的部门信息
export const reqDontUseDept = (page, limit) => requests({ url: `/my/dept/dontusedept/${page}/${limit}`, method: 'get' })
//部门新增
export const reqAddDept = (data) => requests({ url: '/my/dept/adddept', data, method: 'post' })
//部门修改
export const reqEditDept = (data) => requests({ url: `/my/dept/editdept`, data, method: 'post' })
//部门删除
export const reqDeleteDept = (did) => requests({ url: `/my/dept/deletedept/${did}`, method: 'get' })
//撤销部门删除
export const reqDontDeleteDept = (did) => requests({ url: `/my/dept/dontdeletedept/${did}`, method: 'get' })
//获取员工所有信息
export const reqEmpUserInfo = (page, limit) => requests({ url: `/my/emp/userinfo/${page}/${limit}`, method: 'get' })
//获取离职员工所有信息
export const reqSelectDnotUseEmp = (page, limit) => requests({ url: `/my/emp/dnotuseemp/${page}/${limit}`, method: 'get' })
//添加员工
export const reqAddEmp = (data) => requests({ url: '/my/emp/addemp', data, method: 'post' })
//修改员工
export const reqEditEmp = (data) =>requests({url:'/my/emp/editemp',data,method:'post'})
//删除员工
export const reqDeleteEmp = (eid) =>requests({url:`/my/emp/deleteemp/${eid}`,method:'get'})
//撤销员工
export const reqDontDeleteEmp = (eid) =>requests({url:`/my/emp/dontdeleteemp/${eid}`,method:'get'})
//在职员工模糊查询
export const reqFuzzySelect = (page,limit,data) => requests({url:`/my/emp/fuzzyselect/${page}/${limit}`,data,method:'post'})
//离职员工模糊查询
export const reqDnotFuzzySelect = (page,limit,data) => requests({url:`/my/emp/dnotfuzzyselect/${page}/${limit}`,data,method:'post'})